﻿

#region Using Statements

// System References
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;

// XNA References
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

// Internal References
using Freeform.Framework.Graphics;

#endregion


namespace Freeform.Framework.Utility
{
    /// <summary>
    /// Process properties allow you to control how a function is computed.
    /// </summary>
    public class ProcessProperties
    {

        #region Members

        /// <summary>
        /// Gets a reference to the thread that is used to handle this function if multi-threading is used.
        /// </summary>
        public virtual Thread Thread { get; internal set; }


        /// <summary>
        /// Gets the handling type for this function.
        /// </summary>
        public virtual ProcessHandling ProcessHandling
        {
            get { return _ProcessHandling; }
            set
            {
                _ProcessHandling = value;

#if XBOX
#else
                if (_ProcessHandling != ProcessHandling.Multithread)
                    Thread = null;
#endif
            }
        }
        private ProcessHandling _ProcessHandling = ProcessHandling.None;

        #endregion


        #region Init

        /// <summary>
        /// Creates a new set of process properties.
        /// </summary>
        public ProcessProperties() { }

        #endregion
    }
}
